Integrand size = 31, antiderivative size = 93 \[ \int \cos ^3(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx=\frac {2 (A-B) (a+a \sin (e+f x))^{2+m}}{a^2 f (2+m)}-\frac {(A-3 B) (a+a \sin (e+f x))^{3+m}}{a^3 f (3+m)}-\frac {B (a+a \sin (e+f x))^{4+m}}{a^4 f (4+m)} \]
2*(A-B)*(a+a*sin(f*x+e))^(2+m)/a^2/f/(2+m)-(A-3*B)*(a+a*sin(f*x+e))^(3+m)/ a^3/f/(3+m)-B*(a+a*sin(f*x+e))^(4+m)/a^4/f/(4+m)
Time = 0.21 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.00 \[ \int \cos ^3(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx=\frac {2 (A-B) (a+a \sin (e+f x))^{2+m}}{a^2 f (2+m)}-\frac {(A-3 B) (a+a \sin (e+f x))^{3+m}}{a^3 f (3+m)}-\frac {B (a+a \sin (e+f x))^{4+m}}{a^4 f (4+m)} \]
(2*(A - B)*(a + a*Sin[e + f*x])^(2 + m))/(a^2*f*(2 + m)) - ((A - 3*B)*(a + a*Sin[e + f*x])^(3 + m))/(a^3*f*(3 + m)) - (B*(a + a*Sin[e + f*x])^(4 + m ))/(a^4*f*(4 + m))
Time = 0.32 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3042, 3315, 27, 86, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(e+f x) (a \sin (e+f x)+a)^m (A+B \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (e+f x)^3 (a \sin (e+f x)+a)^m (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3315 |
\(\displaystyle \frac {\int \frac {(a-a \sin (e+f x)) (\sin (e+f x) a+a)^{m+1} (a A+a B \sin (e+f x))}{a}d(a \sin (e+f x))}{a^3 f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int (a-a \sin (e+f x)) (\sin (e+f x) a+a)^{m+1} (a A+a B \sin (e+f x))d(a \sin (e+f x))}{a^4 f}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \frac {\int \left (2 a^2 (A-B) (\sin (e+f x) a+a)^{m+1}-a (A-3 B) (\sin (e+f x) a+a)^{m+2}-B (\sin (e+f x) a+a)^{m+3}\right )d(a \sin (e+f x))}{a^4 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {2 a^2 (A-B) (a \sin (e+f x)+a)^{m+2}}{m+2}-\frac {a (A-3 B) (a \sin (e+f x)+a)^{m+3}}{m+3}-\frac {B (a \sin (e+f x)+a)^{m+4}}{m+4}}{a^4 f}\) |
((2*a^2*(A - B)*(a + a*Sin[e + f*x])^(2 + m))/(2 + m) - (a*(A - 3*B)*(a + a*Sin[e + f*x])^(3 + m))/(3 + m) - (B*(a + a*Sin[e + f*x])^(4 + m))/(4 + m ))/(a^4*f)
3.11.22.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && Intege rQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]
Time = 2.31 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.59
method | result | size |
parallelrisch | \(\frac {\left (\left (\left (A +B \right ) m +4 A \right ) \left (2+m \right ) \sin \left (3 f x +3 e \right )+2 \left (A \,m^{2}+\left (4 A -5 B \right ) m -6 B \right ) \cos \left (2 f x +2 e \right )-\frac {B \left (3+m \right ) \left (2+m \right ) \cos \left (4 f x +4 e \right )}{2}+\left (\left (A +B \right ) m +4 A \right ) \left (m +18\right ) \sin \left (f x +e \right )+\left (2 A +\frac {B}{2}\right ) m^{2}+\left (24 A +\frac {17 B}{2}\right ) m +64 A -9 B \right ) \left (a \left (1+\sin \left (f x +e \right )\right )\right )^{m}}{4 \left (m^{3}+9 m^{2}+26 m +24\right ) f}\) | \(148\) |
derivativedivides | \(\frac {\left (A \,m^{2}+8 A m -B m +16 A -6 B \right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (m^{3}+9 m^{2}+26 m +24\right )}+\frac {\left (A \,m^{2}+B \,m^{2}+10 A m +6 B m +24 A \right ) \sin \left (f x +e \right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (m^{3}+9 m^{2}+26 m +24\right )}-\frac {B \left (\sin ^{4}\left (f x +e \right )\right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (4+m \right )}-\frac {\left (A \,m^{2}-B \,m^{2}+4 A m -10 B m -12 B \right ) \left (\sin ^{2}\left (f x +e \right )\right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (m^{3}+9 m^{2}+26 m +24\right )}-\frac {\left (A m +B m +4 A \right ) \left (\sin ^{3}\left (f x +e \right )\right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (m^{2}+7 m +12\right )}\) | \(261\) |
default | \(\frac {\left (A \,m^{2}+8 A m -B m +16 A -6 B \right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (m^{3}+9 m^{2}+26 m +24\right )}+\frac {\left (A \,m^{2}+B \,m^{2}+10 A m +6 B m +24 A \right ) \sin \left (f x +e \right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (m^{3}+9 m^{2}+26 m +24\right )}-\frac {B \left (\sin ^{4}\left (f x +e \right )\right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (4+m \right )}-\frac {\left (A \,m^{2}-B \,m^{2}+4 A m -10 B m -12 B \right ) \left (\sin ^{2}\left (f x +e \right )\right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (m^{3}+9 m^{2}+26 m +24\right )}-\frac {\left (A m +B m +4 A \right ) \left (\sin ^{3}\left (f x +e \right )\right ) {\mathrm e}^{m \ln \left (a \left (1+\sin \left (f x +e \right )\right )\right )}}{f \left (m^{2}+7 m +12\right )}\) | \(261\) |
1/4*(((A+B)*m+4*A)*(2+m)*sin(3*f*x+3*e)+2*(A*m^2+(4*A-5*B)*m-6*B)*cos(2*f* x+2*e)-1/2*B*(3+m)*(2+m)*cos(4*f*x+4*e)+((A+B)*m+4*A)*(m+18)*sin(f*x+e)+(2 *A+1/2*B)*m^2+(24*A+17/2*B)*m+64*A-9*B)*(a*(1+sin(f*x+e)))^m/(m^3+9*m^2+26 *m+24)/f
Time = 0.29 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.45 \[ \int \cos ^3(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx=-\frac {{\left ({\left (B m^{2} + 5 \, B m + 6 \, B\right )} \cos \left (f x + e\right )^{4} - {\left ({\left (A + B\right )} m^{2} + 4 \, A m\right )} \cos \left (f x + e\right )^{2} - 4 \, {\left (A + B\right )} m - {\left ({\left ({\left (A + B\right )} m^{2} + 2 \, {\left (3 \, A + B\right )} m + 8 \, A\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left (A + B\right )} m + 16 \, A\right )} \sin \left (f x + e\right ) - 16 \, A\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m}}{f m^{3} + 9 \, f m^{2} + 26 \, f m + 24 \, f} \]
-((B*m^2 + 5*B*m + 6*B)*cos(f*x + e)^4 - ((A + B)*m^2 + 4*A*m)*cos(f*x + e )^2 - 4*(A + B)*m - (((A + B)*m^2 + 2*(3*A + B)*m + 8*A)*cos(f*x + e)^2 + 4*(A + B)*m + 16*A)*sin(f*x + e) - 16*A)*(a*sin(f*x + e) + a)^m/(f*m^3 + 9 *f*m^2 + 26*f*m + 24*f)
Leaf count of result is larger than twice the leaf count of optimal. 5243 vs. \(2 (78) = 156\).
Time = 11.04 (sec) , antiderivative size = 5243, normalized size of antiderivative = 56.38 \[ \int \cos ^3(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx=\text {Too large to display} \]
Piecewise((x*(A + B*sin(e))*(a*sin(e) + a)**m*cos(e)**3, Eq(f, 0)), (4*A*s in(e + f*x)**2/(6*a**4*f*sin(e + f*x)**3 + 18*a**4*f*sin(e + f*x)**2 + 18* a**4*f*sin(e + f*x) + 6*a**4*f) + 6*A*sin(e + f*x)/(6*a**4*f*sin(e + f*x)* *3 + 18*a**4*f*sin(e + f*x)**2 + 18*a**4*f*sin(e + f*x) + 6*a**4*f) - 2*A* cos(e + f*x)**2/(6*a**4*f*sin(e + f*x)**3 + 18*a**4*f*sin(e + f*x)**2 + 18 *a**4*f*sin(e + f*x) + 6*a**4*f) + 2*A/(6*a**4*f*sin(e + f*x)**3 + 18*a**4 *f*sin(e + f*x)**2 + 18*a**4*f*sin(e + f*x) + 6*a**4*f) - 6*B*log(sin(e + f*x) + 1)*sin(e + f*x)**3/(6*a**4*f*sin(e + f*x)**3 + 18*a**4*f*sin(e + f* x)**2 + 18*a**4*f*sin(e + f*x) + 6*a**4*f) - 18*B*log(sin(e + f*x) + 1)*si n(e + f*x)**2/(6*a**4*f*sin(e + f*x)**3 + 18*a**4*f*sin(e + f*x)**2 + 18*a **4*f*sin(e + f*x) + 6*a**4*f) - 18*B*log(sin(e + f*x) + 1)*sin(e + f*x)/( 6*a**4*f*sin(e + f*x)**3 + 18*a**4*f*sin(e + f*x)**2 + 18*a**4*f*sin(e + f *x) + 6*a**4*f) - 6*B*log(sin(e + f*x) + 1)/(6*a**4*f*sin(e + f*x)**3 + 18 *a**4*f*sin(e + f*x)**2 + 18*a**4*f*sin(e + f*x) + 6*a**4*f) - 10*B*sin(e + f*x)**2/(6*a**4*f*sin(e + f*x)**3 + 18*a**4*f*sin(e + f*x)**2 + 18*a**4* f*sin(e + f*x) + 6*a**4*f) - 3*B*sin(e + f*x)*cos(e + f*x)**2/(6*a**4*f*si n(e + f*x)**3 + 18*a**4*f*sin(e + f*x)**2 + 18*a**4*f*sin(e + f*x) + 6*a** 4*f) - 18*B*sin(e + f*x)/(6*a**4*f*sin(e + f*x)**3 + 18*a**4*f*sin(e + f*x )**2 + 18*a**4*f*sin(e + f*x) + 6*a**4*f) - B*cos(e + f*x)**2/(6*a**4*f*si n(e + f*x)**3 + 18*a**4*f*sin(e + f*x)**2 + 18*a**4*f*sin(e + f*x) + 6*...
Leaf count of result is larger than twice the leaf count of optimal. 285 vs. \(2 (93) = 186\).
Time = 0.22 (sec) , antiderivative size = 285, normalized size of antiderivative = 3.06 \[ \int \cos ^3(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx=-\frac {\frac {{\left ({\left (m^{2} + 3 \, m + 2\right )} a^{m} \sin \left (f x + e\right )^{3} + {\left (m^{2} + m\right )} a^{m} \sin \left (f x + e\right )^{2} - 2 \, a^{m} m \sin \left (f x + e\right ) + 2 \, a^{m}\right )} A {\left (\sin \left (f x + e\right ) + 1\right )}^{m}}{m^{3} + 6 \, m^{2} + 11 \, m + 6} + \frac {{\left ({\left (m^{3} + 6 \, m^{2} + 11 \, m + 6\right )} a^{m} \sin \left (f x + e\right )^{4} + {\left (m^{3} + 3 \, m^{2} + 2 \, m\right )} a^{m} \sin \left (f x + e\right )^{3} - 3 \, {\left (m^{2} + m\right )} a^{m} \sin \left (f x + e\right )^{2} + 6 \, a^{m} m \sin \left (f x + e\right ) - 6 \, a^{m}\right )} B {\left (\sin \left (f x + e\right ) + 1\right )}^{m}}{m^{4} + 10 \, m^{3} + 35 \, m^{2} + 50 \, m + 24} - \frac {{\left (a^{m} {\left (m + 1\right )} \sin \left (f x + e\right )^{2} + a^{m} m \sin \left (f x + e\right ) - a^{m}\right )} B {\left (\sin \left (f x + e\right ) + 1\right )}^{m}}{m^{2} + 3 \, m + 2} - \frac {{\left (a \sin \left (f x + e\right ) + a\right )}^{m + 1} A}{a {\left (m + 1\right )}}}{f} \]
-(((m^2 + 3*m + 2)*a^m*sin(f*x + e)^3 + (m^2 + m)*a^m*sin(f*x + e)^2 - 2*a ^m*m*sin(f*x + e) + 2*a^m)*A*(sin(f*x + e) + 1)^m/(m^3 + 6*m^2 + 11*m + 6) + ((m^3 + 6*m^2 + 11*m + 6)*a^m*sin(f*x + e)^4 + (m^3 + 3*m^2 + 2*m)*a^m* sin(f*x + e)^3 - 3*(m^2 + m)*a^m*sin(f*x + e)^2 + 6*a^m*m*sin(f*x + e) - 6 *a^m)*B*(sin(f*x + e) + 1)^m/(m^4 + 10*m^3 + 35*m^2 + 50*m + 24) - (a^m*(m + 1)*sin(f*x + e)^2 + a^m*m*sin(f*x + e) - a^m)*B*(sin(f*x + e) + 1)^m/(m ^2 + 3*m + 2) - (a*sin(f*x + e) + a)^(m + 1)*A/(a*(m + 1)))/f
Leaf count of result is larger than twice the leaf count of optimal. 432 vs. \(2 (93) = 186\).
Time = 0.40 (sec) , antiderivative size = 432, normalized size of antiderivative = 4.65 \[ \int \cos ^3(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx=-\frac {\frac {{\left ({\left (a \sin \left (f x + e\right ) + a\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} m - 2 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{2} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} a m + 2 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} - 6 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{2} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} a\right )} A}{a^{2} m^{2} + 5 \, a^{2} m + 6 \, a^{2}} + \frac {{\left ({\left (a \sin \left (f x + e\right ) + a\right )}^{4} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} m^{2} - 3 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} a m^{2} + 2 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{2} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} a^{2} m^{2} + 5 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{4} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} m - 18 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} a m + 14 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{2} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} a^{2} m + 6 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{4} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} - 24 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} a + 24 \, {\left (a \sin \left (f x + e\right ) + a\right )}^{2} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} a^{2}\right )} B}{{\left (a^{2} m^{3} + 9 \, a^{2} m^{2} + 26 \, a^{2} m + 24 \, a^{2}\right )} a}}{a f} \]
-(((a*sin(f*x + e) + a)^3*(a*sin(f*x + e) + a)^m*m - 2*(a*sin(f*x + e) + a )^2*(a*sin(f*x + e) + a)^m*a*m + 2*(a*sin(f*x + e) + a)^3*(a*sin(f*x + e) + a)^m - 6*(a*sin(f*x + e) + a)^2*(a*sin(f*x + e) + a)^m*a)*A/(a^2*m^2 + 5 *a^2*m + 6*a^2) + ((a*sin(f*x + e) + a)^4*(a*sin(f*x + e) + a)^m*m^2 - 3*( a*sin(f*x + e) + a)^3*(a*sin(f*x + e) + a)^m*a*m^2 + 2*(a*sin(f*x + e) + a )^2*(a*sin(f*x + e) + a)^m*a^2*m^2 + 5*(a*sin(f*x + e) + a)^4*(a*sin(f*x + e) + a)^m*m - 18*(a*sin(f*x + e) + a)^3*(a*sin(f*x + e) + a)^m*a*m + 14*( a*sin(f*x + e) + a)^2*(a*sin(f*x + e) + a)^m*a^2*m + 6*(a*sin(f*x + e) + a )^4*(a*sin(f*x + e) + a)^m - 24*(a*sin(f*x + e) + a)^3*(a*sin(f*x + e) + a )^m*a + 24*(a*sin(f*x + e) + a)^2*(a*sin(f*x + e) + a)^m*a^2)*B/((a^2*m^3 + 9*a^2*m^2 + 26*a^2*m + 24*a^2)*a))/(a*f)
Time = 12.92 (sec) , antiderivative size = 272, normalized size of antiderivative = 2.92 \[ \int \cos ^3(e+f x) (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx=\frac {{\left (a\,\left (\sin \left (e+f\,x\right )+1\right )\right )}^m\,\left (128\,A-18\,B+48\,A\,m+17\,B\,m+144\,A\,\sin \left (e+f\,x\right )-24\,B\,\cos \left (2\,e+2\,f\,x\right )-6\,B\,\cos \left (4\,e+4\,f\,x\right )+4\,A\,m^2+B\,m^2+16\,A\,\sin \left (3\,e+3\,f\,x\right )+4\,A\,m^2\,\cos \left (2\,e+2\,f\,x\right )-B\,m^2\,\cos \left (4\,e+4\,f\,x\right )+2\,A\,m^2\,\sin \left (3\,e+3\,f\,x\right )+2\,B\,m^2\,\sin \left (3\,e+3\,f\,x\right )+44\,A\,m\,\sin \left (e+f\,x\right )+36\,B\,m\,\sin \left (e+f\,x\right )+16\,A\,m\,\cos \left (2\,e+2\,f\,x\right )-20\,B\,m\,\cos \left (2\,e+2\,f\,x\right )-5\,B\,m\,\cos \left (4\,e+4\,f\,x\right )+12\,A\,m\,\sin \left (3\,e+3\,f\,x\right )+2\,A\,m^2\,\sin \left (e+f\,x\right )+4\,B\,m\,\sin \left (3\,e+3\,f\,x\right )+2\,B\,m^2\,\sin \left (e+f\,x\right )\right )}{8\,f\,\left (m^3+9\,m^2+26\,m+24\right )} \]
((a*(sin(e + f*x) + 1))^m*(128*A - 18*B + 48*A*m + 17*B*m + 144*A*sin(e + f*x) - 24*B*cos(2*e + 2*f*x) - 6*B*cos(4*e + 4*f*x) + 4*A*m^2 + B*m^2 + 16 *A*sin(3*e + 3*f*x) + 4*A*m^2*cos(2*e + 2*f*x) - B*m^2*cos(4*e + 4*f*x) + 2*A*m^2*sin(3*e + 3*f*x) + 2*B*m^2*sin(3*e + 3*f*x) + 44*A*m*sin(e + f*x) + 36*B*m*sin(e + f*x) + 16*A*m*cos(2*e + 2*f*x) - 20*B*m*cos(2*e + 2*f*x) - 5*B*m*cos(4*e + 4*f*x) + 12*A*m*sin(3*e + 3*f*x) + 2*A*m^2*sin(e + f*x) + 4*B*m*sin(3*e + 3*f*x) + 2*B*m^2*sin(e + f*x)))/(8*f*(26*m + 9*m^2 + m^3 + 24))